package com.zyp.service;

import com.zyp.dao.StudentDao;
import com.zyp.factory.StudentDaoFatory;

import java.util.List;

public class StudentService {

    private StudentDao studentDao;
    public StudentService(){
        this.studentDao = StudentDaoFatory.getStudentDao();
    }

    //自定义方法
    public int getStudetService(Object[] student){
        return studentDao.add(student);
    }

    public int getDeleteService(String s){
        return studentDao.delete(s);
    }
    public int getUpdateService(Object[] student){
        return studentDao.update(student);
    }

    public List<Object[]> getPagingQueryService(int i){
        return studentDao.pagingQuery(i);
    }
}
